<template>
    <swiper>
      <swiper-item v-for="(item,index) in banners" :key='item+index'>
     <a :href="item.link">
       <img :src="item.image" @load="swiperimgload">
     </a>
   </swiper-item>
   </swiper>  
</template>

<script>
import { Swiper, SwiperItem} from 'components/common/swiper/index'
export default {
  name:'homesswiper',
  components: {
    Swiper,SwiperItem
  },
  props:{
    banners:Array,
    default(){
      return[]
    }
  },
  data () {
    return {
      isload:false
    }
  },
  methods: {
   swiperimgload(){
     if(!this.isload){
       this.$emit('swiperimgload')
       this.isload=true
     }
   }
  }
}
</script>

<style  scoped>

</style>